package cn.outsourcing.supermarket.converter;

import cn.outsourcing.supermarket.converter.transform.BooleanToIntegerTransform;
import cn.outsourcing.supermarket.po.HiolabsCart;
import cn.outsourcing.supermarket.vo.cart.AddCartListVO;
import cn.outsourcing.supermarket.vo.hiolabs.HiolabsCartVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 购物车解析器
 *
 * @author gzkemays
 * @since 2021/10/22 18:08
 */
@Mapper(uses = {BooleanToIntegerTransform.class})
public interface HiolabsCartConverter {
  HiolabsCartConverter INSTANCE = Mappers.getMapper(HiolabsCartConverter.class);

  AddCartListVO convertToAddCartVo(HiolabsCart cart);

  List<AddCartListVO> convertToAddCartVoList(List<HiolabsCart> cart);

  List<HiolabsCartVO> convertToVoList(List<HiolabsCart> cartList);

  HiolabsCartVO convertToVo(HiolabsCart cart);
}
